#include<iostream>

using namespace std;

class Date
{
public:
	Date(int year = 1, int reday = 0)
		:_year(1)
		, _month(1)
		, _day(0)

	{
		static int Monthday[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
		this->_year = year;
		this->_month = 1;
		
		if ((year % 4 == 0 && !(year % 100 == 0)) || (year % 400 == 0))
		{
			Monthday[2]++;
		}
		
		int i = 1;
		while (reday - Monthday[i] > 0)
		{
			reday -= Monthday[i];
			(this->_month)++;
			i++;
		}
		
		this->_day = reday;
		Monthday[2] = 28;
	}

private:
	int _year;
	int _month;
	int _day;
};

//Date::Date(int year, int reday)
//{
//	static int Monthday[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
//	this->_year = year;
//	this->_month = 1;
//
//	if ((year % 4 == 0 && !(year % 100 == 0)) || (year % 400 == 0))
//	{
//		Monthday[2]++;
//	}
//
//	int i = 1;
//	while (reday - Monthday[i] > 0)
//	{
//		reday -= Monthday[i];
//		(this->_month)++;
//		i++;
//	}
//
//	this->_day = reday;
//	Monthday[2] = 28;
//}

int main()
{
	int year = 0;
	int reday = 0;

	Date daaa[10];



	return 0;
}